package com.boomkeeper.core.constant;

import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;

public class Constant {
	public static String JSON_FILE_NAME = "classpath:config.json";
	
	public static String REGX_DIRECTORY = "^\\w.+\\w$";
	
	public static String REGX_TEST_REPORT_FILES = "^\\bLTE-TestReport\\w+\\b$";
	
	public static String REGX_SCHEME_FILES = "^\\bLTE-Scheme\\b$";
	
	public static String FTP_BASE_PATH = "/app/versiondata/LTE/";
	
	public static String DATE_FORMATE_1 = "yyyyMMdd";
	
	public static String DATE_FORMATE_2 = "yyyy_MM_dd";
	
	public static String DATE_FORMATE_3 = "yyyy/MM/dd";
	
	public static List<String> ARCHIVE_FILE_TYPES = Arrays.asList("doc", "docx", "xls", "xlsx");
	
	public static List<String> CONFIG_FILE_TYPES = Arrays.asList("xml", "sql", "properties");
	
	public static String TEMPLATE_TEST = "mailTemplate-test.ftl";
	
	public static String TEMPLATE_LTE = "mailTemplate-lte.ftl";
	
	public static void main(String[] args) {
		testTestReport();
		testScheme();
		testDir();
	}
	
	private static void testScheme() {
		if (Pattern.matches(REGX_SCHEME_FILES, "LTE-Scheme-20180711-3093535-xuyexin.docx")) {
			System.out.println(0);
		} else {
			System.out.println(1);
		}
	}
	
	private static void testTestReport() {
		if (Pattern.matches(REGX_TEST_REPORT_FILES, "LTE-TestReport-Redmine-3093535-xuyexin.doc")) {
			System.out.println(0);
		} else {
			System.out.println(1);
		}
	}
	
	private static void testDir() {
		if (Pattern.matches(REGX_DIRECTORY, "9nj k * 8 ")) {
			System.out.println(0);
		} else {
			System.out.println(1);
		}
	}
}
